<?php


namespace app\controller;


class MqttUserManage extends BackendController{
    protected $model = null;
    public function _initialize()
    {
        //parent::_initialize();
        $this->model = new \app\model\MqttUserManage();

    }
    public function ana_where($where){
        foreach ($where as &$item){
            if($item[0]=='name'){
                //$item=[['name',$item[1],'%'.$item[2].'%'],['name_code',$item[1],'%'.$item[2].'%'],'OR'];
                //$where[]=['name_code','LIKE','%'.$item[2].'%'];
                //$where['_logic']='or';
                $item=['name|idCard',$item[1],'%'.$item[2].'%'];
            }
        }
        return $where;
    }

}